package com.xydpeng.tech.order.service.order.statemachine;

import com.xydpeng.tech.order.dal.entity.Order;
import lombok.Getter;
import lombok.Setter;

/**
 * @author xydpeng
 * @version v1.0
 * @date: 2024/12/11
 * @description:
 */
@Getter
@Setter
public class OrderContext {

    private Long orderCode;

    private Order order;

    private int transitState = 0;  //初始值

    public void setTransitSuccess() {
        this.transitState = 1;
    }

    public void setTransitFail() {
        this.transitState = 2;
    }


    public boolean isTransitSuccess() {
        return transitState == 1;
    }


}
